import request from "@/axios";

// 获取销售合同列表接口
export const getSellerContractList = option =>
  request({
    url: "/api/order/getprovidercontractpage",
    method: "post",
    data: option
  });

// 获取采购合同列表接口
export const getBuyerContractList = option =>
  request({
    url: "/api/order/getcustomercontractpage",
    method: "post",
    data: option
  });

// 卖家中心,查询销售合同详情信息
export const getSellerContractDetail = option =>
  request({
    url: "/api/order/getprovidercontract",
    method: "get",
    params: option
  });

// 买家中心,查询采购合同详情信息
export const getBuyerContractDetail = option =>
  request({
    url: "/api/order/getcustomercontract",
    method: "get",
    params: option
  });

// 卖家预览合同
export const sellerPreviewContract = option =>
  request({
    url: "/api/order/providerpreviewcontract",
    method: "post",
    data: option
  });

// 买家预览合同
export const buyerPreviewContract = option =>
  request({
    url: "/api/order/customerpreviewcontract",
    method: "post",
    data: option
  });

// 卖家生成合同
export const sellerGenerateContract = option =>
  request({
    url: "/api/order/providercreatecontract",
    method: "get",
    params: option
  });

// 买家生成合同
export const buyerGenerateContract = option =>
  request({
    url: "/api/order/customercreatecontract",
    method: "get",
    params: option
  });

// 买家合同上传双签合同-确认合同无误接口（合同列表）
export const buyerContractListUploadContract = option =>
  request({
    url: "/api/order/customerconfirmcontractuploadcontract",
    method: "post",
    data: option
  });

// 卖家合同上传双签合同-确认合同无误接口（合同列表）
export const sellseContractListUploadContract = option =>
  request({
    url: "/api/order/providerconfirmcontractuploadcontract",
    method: "post",

    data: option
  });

// 买家在订单上传双签合同-确认合同无误接口（订单列表）
export const buyerOrderUploadContract = option =>
  request({
    url: "/api/order/customerconfirmorderuploadcontract",
    method: "post",
    data: option
  });

// 卖家在在订单上传双签合同-确认合同无误接口（订单列表）
export const sellerOrderUploadContract = option =>
  request({
    url: "/api/order/providerconfirmorderuploadcontract",
    method: "post",
    data: option
  });

// 上传法人章接口
export const uploadLegalPersonSeal = option =>
  request({
    url: "/api/company/uploadlegalpersonseal",
    method: "post",
    data: option
  });

//上传合同章接口
export const uploadContractSeal = option =>
  request({
    url: "/api/company/uploadcontractseal",
    method: "post",
    data: option
  });

//上传业务章接口
export const uploadBusinessSeal = option =>
  request({
    url: "/api/company/uploadbusinessseal",
    method: "post",
    data: option
  });

// 修改法人章尺寸接口
export const modifyLegalPersonSealSize = option =>
  request({
    url: "/api/company/updatelegalpersonsealsize",
    method: "post",
    data: option
  });

// 修改合同章尺寸接口
export const modifyContractSealSize = option =>
  request({
    url: "/api/company/updatecontractsealsize",
    method: "post",
    data: option
  });

// 修改业务章尺寸接口
export const modifyBusinessSealSize = option =>
  request({
    url: "/api/company/updatebusinesssealsize",
    method: "post",
    data: option
  });

// 法人章查询接口
export const getLegalPersonSeal = option =>
  request({
    url: "/api/company/getlegalpersonseal",
    method: "get",
    params: option
  });

// 合同章查询接口
export const getContractSeal = option =>
  request({
    url: "/api/company/getcontractseal",
    method: "get",
    params: option
  });

// 业务章查询接口
export const getBusinessSeal = option =>
  request({
    url: "/api/company/getbusinessseal",
    method: "get",
    params: option
  });

// 合同验签接口
export const esignVerifySignature = option =>
  request({
    url: "/api/esign/verifysignature",
    method: "post",
    data: option
  });

// 买家撤销合同
export const buyerCancelContract = option =>
  request({
    url: "/api/order/customercancelcontract",
    method: "get",
    params: option
  });

// 卖家撤销合同
export const sellerCancelContract = option =>
  request({
    url: "/api/order/providercancelcontract",
    method: "get",
    params: option
  });

// 买家合同打回
export const buyerCallbackContract = option =>
  request({
    url: "/api/order/customecallbackcontract",
    method: "get",
    params: option
  });

// 卖家合同打回
export const sellerCallbackContract = option =>
  request({
    url: "/api/order/providercallbackcontract",
    method: "get",
    params: option
  });

// 买家合同盖章-获取意愿刷脸地址
export const getBuyerSignContract = option =>
  request({
    url: "/api/order/customersigncontract",
    method: "post",
    data: option
  });

// 卖家合同盖章-获取意愿刷脸地址
export const getSellerSignContract = option =>
  request({
    url: "/api/order/providersigncontract",
    method: "post",
    data: option
  });

// 合同签署-意愿刷脸手动回调
export const getWillAuthResult = option =>
  request({
    url: "/api/order/contractwillingnessmanualcallback",
    method: "get",
    params: option
  });

// 下载合同
export const fileDownload = option =>
  request({
    url: "/api/file/downloadcontract",
    method: "get",
    params: option,
    responseType: "blob"
  });
